package com.timk.goserver.client.ui.widgets;

import com.timk.goserver.client.ui.screens.MainPanel;

/**
 * UserLinkListener that brings up the user's info when clicked.
 * @author TKington
 *
 */
public class DisplayUserLinkListener implements UserLinkListener {
	private final MainPanel mainPanel;
	
	/**
	 * Creates a DisplayUserLinkListener
	 * @param mainPanel the main panel
	 */
	public DisplayUserLinkListener(MainPanel mainPanel) {
		this.mainPanel = mainPanel;
	}
	
	public void linkClicked(String username) {
		mainPanel.showUser(username);
	}
}
